home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3g / bufsplit.z / bufsplit
Encoding:
Text File  |  2002-10-03  |  3.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4. bbbbuuuuffffsssspppplllliiiitttt((((3333GGGG))))                                                      bbbbuuuuffffsssspppplllliiiitttt((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _bbbb_uuuu_ffff_ssss_pppp_llll_iiii_tttt - split buffer into fields
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _cccc_cccc [_f_l_a_g ...] _f_i_l_e ...  _----_llll_gggg_eeee_nnnn [_l_i_b_r_a_r_y ...]
  13.  
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_gggg_eeee_nnnn_...._hhhh_>>>>
  15.  
  16.      _ssss_iiii_zzzz_eeee______tttt _bbbb_uuuu_ffff_ssss_pppp_llll_iiii_tttt _((((_cccc_hhhh_aaaa_rrrr _****_bbbb_uuuu_ffff_,,,, _ssss_iiii_zzzz_eeee______tttt _nnnn_,,,, _cccc_hhhh_aaaa_rrrr _****_****_aaaa_))))_;;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _bbbb_uuuu_ffff_ssss_pppp_llll_iiii_tttt examines the buffer, _b_u_f, and assigns values to the pointer
  20.      array, _a, so that the pointers point to the first _n fields in _b_u_f that
  21.      are delimited by tabs or new-lines.
  22.  
  23.      To change the characters used to separate fields, call _bbbb_uuuu_ffff_ssss_pppp_llll_iiii_tttt with _b_u_f
  24.      pointing to the string of characters, and _n and _a set to zero.  For
  25.      example, to use '_::::', '_....', and '_,,,,' as separators along with tab and new-
  26.      line:
  27.  
  28.           _bbbb_uuuu_ffff_ssss_pppp_llll_iiii_tttt _((((_""""_::::_...._,,,,_\\\\_tttt_\\\\_nnnn_""""_,,,, _0000_,,,, _((((_cccc_hhhh_aaaa_rrrr_****_****_))))_0000 _))))_;;;;
  29.  
  30. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  31.      The number of fields assigned in the array _a.  If _b_u_f is zero, the return
  32.      value is zero and the array is unchanged.  Otherwise the value is at
  33.      least one.  The remainder of the elements in the array are assigned the
  34.      address of the null byte at the end of the buffer.
  35.  
  36. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  37.      _////_****
  38.       _**** _ssss_eeee_tttt _aaaa_[[[[_0000_]]]] _==== _""""_TTTT_hhhh_iiii_ssss_""""_,,,, _aaaa_[[[[_1111_]]]] _==== _""""_iiii_ssss_""""_,,,, _aaaa_[[[[_2222_]]]] _==== _""""_aaaa_""""_,,,,
  39.       _**** _aaaa_[[[[_3333_]]]] _==== _""""_tttt_eeee_ssss_tttt_""""
  40.       _****_////
  41.      _bbbb_uuuu_ffff_ssss_pppp_llll_iiii_tttt_((((_""""_TTTT_hhhh_iiii_ssss_\\\\_tttt_iiii_ssss_\\\\_tttt_aaaa_\\\\_tttt_tttt_eeee_ssss_tttt_\\\\_nnnn_""""_,,,, _4444_,,,, _aaaa_))))_;;;;
  42.  
  43. NNNNOOOOTTTTEEEESSSS
  44.      _bbbb_uuuu_ffff_ssss_pppp_llll_iiii_tttt changes the delimiters to null bytes in _b_u_f.
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.